package com.ws.app.controller;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ws.app.common.ControllerSupport;
import com.ws.app.service.FunctionService;

@Controller
public class AppController extends ControllerSupport {
    @Resource(name = "ws_app_funcService")
    private FunctionService functionService;

    @RequestMapping("/queryFunc")
    public void queryFunc(HttpServletRequest request,
            HttpServletResponse response) {
        List<Map<String, Object>> funcs = functionService
                .queryFuncMapByUserId(null);
        this.outputJSON(funcs, response);
    }

    public FunctionService getFunctionService() {
        return functionService;
    }

    public void setFunctionService(FunctionService functionService) {
        this.functionService = functionService;
    }

}
